package com.example.poc.food;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@NoArgsConstructor
public class FoodDto {

  @Getter
  private Long id;

  @NotBlank
  @Length(max = 25)
  @Getter
  @Setter
  private String code;

  @NotBlank
  @Length(max = 250)
  @Getter
  @Setter
  private String description;

  public FoodDto(String code, String description) {
    this.code = code;
    this.description = description;
  }

  @Override
  public String toString() {
    return  "[id=" + id +
            ", code=" + code +
            ", description=" + description +
            "]";
  }
}
